function outputStr = formatRW(inputStr)
    %adds whitespace after \reservedwordplot(1,1);

    inputStrCell = cell(1,length(inputStr));

    for c = 1:length(inputStr)
        inputStrCell{c} = inputStr(c);
    end

    rW = {'\\alpha','\\upsilon','\\sim','\\angle','\\phi','\\leq',...
        '\\ast','\\chi','\\infty','\\beta','\\psi','\\clubsuit',...
        '\\gamma','\\omega','\\diamondsuit','\\delta',...
        '\\Gamma','\\heartsuit','\\epsilon','\\Delta',...
        '\\spadesuit','\\zeta','\\Theta','\\leftrightarrow',...
        '\\eta','\\Lambda','\\leftarrow','\\theta','\\Xi',...
        '\\Leftarrow','\\vartheta','\\Pi','\\uparrow',...
        '\\iota','\\Sigma','\\rightarrow','\\kappa',...
        '\\Upsilon','\\Rightarrow','\\lambda','\\Phi',...
        '\\downarrow','\\mu','\\Psi','\\circ','\\nu',...
        '\\Omega','\\pm','\\xi','\\forall','\\geq','\\pi',...
        '\\exists','\\propto','\\rho','\\ni','\\partial',...
        '\\sigma','\\cong','\\bullet','\\varsigma',...
        '\\approx','\\div','\\tau','\\Re','\\neq','\\equiv',...
        '\\oplus','\\aleph','\\Im','\\cup','\\wp','\\otimes',...
        '\\subseteq','\\oslash','\\cap','\\in','\\supseteq',...
        '\\supset','\\lceil','\\subset','\\int','\\cdot','\\o',...
        '\\rfloor','\\neg','\\nabla','\\lfloor','\\times','\\lots',...
        '\\perp','\\surd','\\prime','\\wedge','\\varpi','\\0',...
        '\\rceil','\\rangle','\\mid','\\vee','\\copyright','\\langle'};

    for w = 1:length(rW)
        [startInd endInd] = regexp(inputStr,rW{w});
        for ind = 1:length(endInd)
            %add space at end of reserved words
            inputStrCell{endInd(ind)}  = [inputStrCell{endInd(ind)} ' '];
        end
    end

    outputStr = [inputStrCell{:}];
end
